package TOP101;

/**
 * @Question BM28
 * @Date 2022/11/10 20:05
 * @Solution
 */
public class BM28 {
    public int maxDepth (TreeNode root) {
        if(root==null) {
            return 0;
        }
        return Math.max(maxDepth(root.left),maxDepth(root.right))+1;
    }

}
